﻿using FlashPay.DAO.Interface;
using FlashPay.EF.Models;
using FlashPay.Entity.Parameter;
using FlashPay.Service.Interface;
using System.Collections.Generic;

namespace FlashPay.Service.Impl
{
    public class AuthorizeServiceImpl: AuthorizeService
    {
        private readonly AuthorizeDao _authorizeDao;

        public AuthorizeServiceImpl(AuthorizeDao authorizeDao)
        {
            this._authorizeDao = authorizeDao;
        }

        /// <summary>
        /// 获取所有用户记录
        /// </summary>
        /// <param name="request">查询条件</param>
        /// <returns>List<UserInfo></returns>
        public List<Authorize> GetList(AuthorizeQuery request)
        {
            return _authorizeDao.GetList(request);
        }

        /// <summary>
        /// 获取所有用户记录
        /// </summary>
        /// <param name="request">查询条件</param>
        /// <returns>List<UserInfo></returns>
        public List<Authorize> GetMenuAuthorizes(AuthorizeQuery request)
        {
            return _authorizeDao.GetMenuAuthorizes(request);
        }
    }
}
